import { IAdminStore, IAdminUserInfo } from "@/headers/admin/store.h";
import { MutationTree, Store } from "vuex";
import { MutationBase, registerAll } from "./common";

export enum AdminStoreCommit {

}


export class ChangeUserInfoMutation extends MutationBase<IAdminStore,IAdminUserInfo|null> {
    public mutation(store: IAdminStore, payload: IAdminUserInfo|null): void {
        store.userInfo = payload;
    }
}

const adminMutation:MutationTree<IAdminStore> = {}


registerAll(adminMutation,ChangeUserInfoMutation);

export const AdminMutation = adminMutation